/***********************************************************************
	filename: 	DaterIdCounter.h
	created:	23/5/2012
	author:		4Ys
	
	purpose:	Defines the interface for the IdCounter object
*************************************************************************/
#ifndef _DaterIdCounter_h_
#define _DaterIdCounter_h_

#include "DaterSingleton.h"
#include "DaterIteratorBase.h"
#include "DaterLinktoSQL.h"

namespace Dater
{
	/*!
	\brief
		An entity class contains 21 year calendars front and back.
	*/
	class IdCounter : public Singleton<IdCounter>
	{
	public:
		/*!
		\brief
			Constructor for IdCounter class
		*/
		IdCounter();
		
		/*!
		\brief
			a static function to Get the CalendarYear of the given year

		\param year
			The year of the Calendar.

		\return
			Pointer to the CalendarYear of the given year
		*/
		static int createGroupId();
		
		/*!
		\brief
			Get the CalendarYear of the given year

		\param year
			The year of the Calendar.

		\return
			Pointer to the CalendarYear of the given year
		*/
		static int createGroupEventId();
	private:
		static unsigned long _gid_counter;
		static unsigned long _geid_counter;
	};

}

#endif